package com.jdk8.lambda;

import java.util.function.BiFunction;
import java.util.function.Function;

public class FunctionTest {
/**
 * Function：参数1，返回值
 * BiFunction:参数1，参数2，返回值
 */
	public static void main(String[] args) {
		Function<Integer, Integer> afterFn=s -> s+s;
		
		BiFunction<Integer,Integer,Integer> bf=(s,b) -> s+b;
		Integer fg=bf.apply(-10, 3);
		BiFunction<Integer,Integer,Integer> bifn=bf.andThen(afterFn);
		Integer res=bifn.apply(3, 2);
	}

}
